Magnetic Field Sensor and Associated Method That Can Sense a Position of a Magnet

ABSTRACT

A magnetic field sensor, a magnetic assembly, and a method provide circuits and techniques for or measuring one or more displacement angles of a magnet using magnetic field sensing elements. Applications include, but are not limited to, joysticks.

CROSS REFERENCE TO RELATED APPLICATIONS

This application claims the benefit under 35 U.S.C. §119(e) of U.S.Provisional Application No. 62/016,772 filed Jun. 25, 2014, whichapplication is incorporated herein by reference in its entirety.

STATEMENT REGARDING FEDERALLY SPONSORED RESEARCH

Not Applicable.

FIELD OF THE INVENTION

This invention relates generally to magnetic field sensors and, moreparticularly, to a magnetic field sensor that can sense the position ofthe magnet or a structure attached thereto.

BACKGROUND

Joystick assemblies are known. A known joystick has a shaft, which canbe moved by a user, and electronics, which can sense the position of theshaft. Some known types of joysticks employ optical elements to sense aposition of the shaft. Other known types of joysticks employ magneticelements to sense a position of the shaft.

Known joysticks employ a restoring force, such that, when the userreleases the shaft of the joystick, the shaft returns to the center zeroposition.

SUMMARY

The present invention provides a magnetic assembly that may be used in ajoystick, or that may be used in other applications, for which magnetsused in the magnetic assembly provide a restoring force, and for whichmovement of one of the magnets used in the magnetic assembly is sensedby electronic circuits associated therewith. An electronic circuit canbe used in the magnetic assembly to provide one or more output signalsrepresentative of one or more angles associated with the magnets. Amagnetic field sensor can include the electronic circuit

In accordance with an example useful for understanding an aspect of thepresent invention, a magnetic field sensor includes an electroniccircuit. The electronic circuit can include one or more of thefollowing:

-   -   a substrate having a major surface disposed in an x-y plane;    -   first, second, third, and fourth magnetic field sensing elements        disposed upon the major surface of the substrate and configured        to generate first, second, third and fourth respective        electronic magnetic field signals, wherein each electronic        magnetic field signal is responsive to a respective magnetic        field parallel to the major surface of the substrate, wherein        the first and third magnetic field sensing elements have        respective first and third maximum response axes parallel to        each other, directed in opposite directions, and parallel to the        major surface of the substrate, and wherein the second and        fourth magnetic field sensing elements have respective second        and fourth maximum response axes parallel to each other,        directed in opposite directions, and parallel the major surface        of the substrate, wherein the first and third major response        axes are not parallel to the second and fourth major response        axes;    -   a first differential circuit coupled to the first and third        magnetic field sensing elements and configured to generate a        first difference signal related to a difference between the        first and third electronic magnetic field signals; or    -   a second differential circuit coupled to the second and fourth        magnetic field sensing elements and configured to generate a        second difference signal related to a difference between the        second and fourth electronic magnetic field signals, wherein the        first difference signal has an amplitude related to a an x-axis        projection upon the x-y plane and the second difference signal        has an amplitude related to a y-axis projection upon the x-y        plane.

In accordance with an example useful for understanding another aspect ofthe present invention, a magnetic assembly can include one or more ofthe following:

-   -   a first magnet having north and south magnetic poles;    -   a second magnet having north and south magnetic poles;    -   a movable shaft fixedly coupled to the second magnet such that        movement of the movable shaft results in movement of the second        magnet relative to the first magnet such that a line between        centers of the north and south magnetic poles of the second        magnet is movable relative to a line between the north and south        magnetic poles of the first magnet, Wherein an attraction of the        second magnet to the first magnet result in a restoring force        upon the shaft; or    -   a magnetic field sensor disposed between the first and second        magnets, wherein the magnetic field sensor comprises an        electronic circuit. The electronic circuit can include one or        more of the following:        -   a substrate having a major surface disposed in an x-y plane,            wherein the line between centers of the north and south            magnetic poles of the first magnet is perpendicular to the            x-y plane;        -   first, second, third, and fourth magnetic field sensing            elements disposed upon the major surface of the substrate            and configured to generate first , second, third and fourth            respective electronic magnetic field signals, wherein each            electronic magnetic field signal is responsive to a            respective magnetic field parallel to the major surface of            the substrate, wherein the first and third magnetic field            sensing elements have respective first and third maximum            response axes parallel to each other, directed in opposite            directions, and parallel the major surface of the substrate,            and wherein the second and fourth magnetic field sensing            elements have respective second and fourth maximum response            axes parallel to each other, directed in opposite            directions, and parallel the major surface of the substrate,            wherein. the first and third major response axes are not            parallel to the second and fourth major response axes;        -   a first differential circuit coupled to the first and third            magnetic field sensing elements and configured to generate a            first difference signal related to a difference between the            first and third electronic magnetic field signals; or        -   a second differential circuit coupled to the second and            fourth magnetic field sensing elements and configured to            generate a second difference signal related to a difference.            between the second and fourth electronic magnetic field            signals, wherein the first difference signal has an            amplitude related to a an x-axis projection upon the x-y            plane and the second. difference signal has an amplitude            related to a y-axis projection upon the x-y plane.

In accordance with an example useful for understanding another aspect ofthe present invention, a method of sensing a position of a magnet caninclude one or more of the following:

providing, upon a substrate, first, second, third, and fourth magneticfield sensing elements configured to generate first, second, third andfourth respective electronic magnetic field signals, wherein eachelectronic magnetic field signal is responsive to a respective magneticfield parallel to the major surface of the substrate, wherein the firstand third magnetic field sensing elements have respective first andthird maximum response axes parallel to each other, directed in oppositedirections, and parallel, to the major surface of the substrate, andwherein the second and fourth magnetic field sensing elements haverespective second and fourth maximum response axes parallel to eachother, directed in opposite directions, and parallel the major surfaceof the substrate, wherein the first and third major response axes arenot parallel to the second and fourth major response axes;

generating a first difference signal related to a difference between thefirst and third electronic magnetic field signals; or

generating a second difference signal related to a difference betweenthe second and fourth electronic magnetic field signals.

In accordance with an example useful for understanding another aspect ofthe present invention, a method of sensing a position of a magnet caninclude one or more of the following:

providing a first magnet having north and south magnetic poles;

providing a second magnet having north and south magnetic poles;

providing a movable shaft fixedly coupled to the second magnet such thatmovement of the movable shaft results in movement of the second magnetrelative to the first magnet such that a line between centers of thenorth and south magnetic poles of the second magnet is movable relativeto a line between the north and south magnetic poles of the firstmagnet, wherein an attraction of the second magnet to the first magnetresult in a restoring force upon the shaft; or

providing a magnetic field sensor disposed between the first and secondmagnets, wherein the magnetic field sensor comprises an electroniccircuit. The electronic circuit can include one or more of thefollowing:

-   -   a substrate having a major surface disposed in an x-y plane,        wherein the line between centers of the north and south magnetic        poles of the first magnet is perpendicular to the x-y plane;    -   first, second, third, and fourth magnetic field sensing elements        disposed upon the major surface of the substrate and configured        to generate first, second, third and fourth respective        electronic magnetic field signals, wherein each electronic        magnetic field signal is responsive to a respective magnetic        field parallel to the major surface of the substrate, wherein        the first and third magnetic field sensing elements have        respective first and third maximum response axes parallel to        each other, directed in opposite directions, and parallel the        major surface of the substrate, and wherein the second and        fourth magnetic field sensing elements have respective second        and fourth maximum response axes parallel to each other,        directed in opposite directions, and parallel the major surface        of the substrate, wherein the first and third major response        axes are not parallel to the second and fourth major response        axes;    -   generating a first difference signal related to a difference        between the first and third electronic magnetic field signals;        or    -   generating a second difference signal related to a difference        between the second and fourth electronic magnetic field signals,        wherein the first difference signal has an amplitude related to        a an x-axis projection upon the x-y plane and the second        difference signal has an amplitude related to a y-axis        projection upon the x-y plane.

In accordance with an example useful for understanding another aspect ofthe present invention, a magnetic field sensor can include an electroniccircuit. The electronic circuit can include one or more of thefollowing:

-   -   a substrate having a major surface disposed in an x-y plane;    -   a plurality of magnetic field sensing elements disposed upon the        major surface of the substrate and configured to generate a        respective plurality of electronic magnetic field signals,        wherein each electronic magnetic field signal is responsive to a        respective magnetic field parallel to the major surface of the        substrate, Wherein the plurality of magnetic field sensing        elements have respective maximum response axes directed in        different directions and parallel to the major surface of the        substrate;    -   a processor coupled to the plurality of magnetic field sensing        elements and configured to generate a first signal and a second        signal, wherein the first signal has an amplitude related to a        an x-axis projection upon the x-y plane and the second signal        has an amplitude related to a y-axis projection upon the x-y        plane; or    -   a magnet disposed at a fixed relationship and proximate to the        substrate, wherein the magnet has a north pole and a south pole,        a line between which is perpendicular to the major surface of        the substrate, wherein a magnetic force of the magnet results in        a restoring force upon a shaft.

In accordance with an example useful for understanding another aspect ofthe present invention, a magnetic assembly can include one or more ofthe following:

a first magnet having north and south magnetic poles;

a second magnet having north and south magnetic poles;

a movable shaft fixedly coupled to the second magnet such that movementof the movable shaft results in movement of the second magnet relativeto the first magnet such that a line between centers of the north andsouth magnetic poles of the second magnet is movable relative to a linebetween the north and south magnetic poles of the first magnet, whereinan attraction of the second magnet to the first magnet result in arestoring force upon the shaft; or

a magnetic field sensor disposed between the first and second magnets,wherein the magnetic field sensor comprises an electronic circuit. Theelectronic circuit can include one or more of the following.

-   -   a substrate having a major surface disposed in an x-y plane,        wherein the line between centers of the north and south magnetic        poles of the first magnet is perpendicular to the x-y plane;    -   a plurality of magnetic field sensing elements disposed upon the        major surface of the substrate and configured to generate a        respective plurality of electronic magnetic field signals,        wherein each electronic magnetic field signal is responsive to a        respective magnetic field parallel to the major surface of the        substrate, wherein the plurality of magnetic field sensing        elements have respective maximum response axes directed in        different directions and parallel to the major surface of the        substrate; or    -   a processor coupled to the plurality of magnetic field sensing        elements and configured to generate a first signal and a second        signal, wherein the first signal has an amplitude related to a        an x-axis projection upon the x-y plane and the second signal        has an amplitude related to a y-axis projection upon the x-y        plane.

In accordance with an example useful for understanding another aspect ofthe present invention, a method of sensing a position of a magnet caninclude one or more of the following:

providing, upon a substrate, a plurality of magnetic field sensingelements disposed upon the major surface of the substrate and configuredto generate a respective plurality of electronic magnetic field signals,wherein each electronic magnetic field signal is responsive to arespective magnetic field parallel to the major surface of thesubstrate, wherein the plurality of magnetic field sensing elements haverespective maximum response axes directed in different directions and.parallel to the major surface of the substrate;

generating a first signal and a second signal, wherein the first signalhas an amplitude related to a an x-axis projection upon the x-y planeand the second signal has an amplitude related to a y-axis projectionupon the x-y plane; or

providing a magnet disposed at a fixed relationship and proximate to thesubstrate, wherein the magnet has a north pole and a south pole, a linebetween which is perpendicular to the major surface of the substrate,wherein a magnetic force of the magnet results in a restoring force upona shaft.

In accordance with an example useful for understanding another aspect ofthe present invention, a method of sensing a position of a magnet caninclude one or more of the following:

providing a first magnet having north and south magnetic poles;

providing a second magnet having north and south magnetic poles;

providing a movable shaft fixedly coupled to the second magnet such thatmovement of the movable shaft results in movement of the second magnetrelative to the first magnet such that a line between centers of thenorth and south magnetic poles of the second magnet is movable relativeto a line between the north and south magnetic poles of the firstmagnet, wherein an attraction of the second magnet to the first magnetresult in a restoring force upon the shaft; or

providing a magnetic field sensor disposed between the first and secondmagnets, wherein the magnetic field sensor comprises an electroniccircuit. The electrconic circuit can include one or more of thefollowing:

-   -   a substrate having a major surface disposed in an x-y plane,        wherein the line between centers of the north and south magnetic        poles of the first magnet is perpendicular to the x-y plane; or    -   a plurality of magnetic field sensing elements disposed upon the        major surface of the substrate and configured to generate a        respective plurality of electronic magnetic field signals,        wherein each electronic magnetic field signal is responsive to a        respective magnetic field parallel to the major surface of the        substrate, wherein the plurality of magnetic field sensing        elements have respective maximum response axes directed in        different directions and parallel to the major surface of the        substrate. The method can also include:

generating a first signal and a second signal, wherein the first signalhas an amplitude related to an x-axis projection upon the plane and thesecond signal has an amplitude related to a y-axis projection upon thex-y plane.

BRIEF DESCRIPTION OF THE DRAWINGS

The foregoing features of the invention, as well as the invention itselfmay be more fully understood from the following detailed description ofthe drawings, in which:

FIG. 1 is a side view showing a magnetic assembly having first andsecond magnets and an electronic substrate disposed between the firstand second magnets;

FIG. 2 is a top view of the magnetic assembly of FIG. 1;

FIG. 3 is a side view showing the magnetic assembly of FIG. 1 with achange of position of the second magnet;

FIG. 4 is a top view of the magnetic assembly of FIG. 3;

FIG. 5 is a side view showing yet another magnetic assembly having firstand second magnets and an electronic substrate disposed between thefirst and second magnets;

FIG. 6 is a top view of the magnetic assembly of FIG. 5;

FIG. 7 is a side view showing the magnetic assembly of FIG. 5 with achange of position of the second magnet;

FIG. 8 is a top view of the magnetic assembly of FIG. 7;

FIG. 9 is a side view showing yet another magnetic assembly having firstand second magnets and an electronic substrate disposed between thefirst and second magnets;

FIG. 10 is a top view of the magnetic assembly of FIG. 9;

FIG. 11 is a side view Showing the magnetic assembly of FIG. 9 with achange of position of the second magnet;

FIG. 12 is a top view of the magnetic assembly of FIG. 11;

FIG. 13 is a top view of an electronic substrate having four magneticfield sensing elements and an electronic circuit that can be used as oneof the above-mentioned electronic substrates;

FIG. 14 is a graph showing four signals that can be generated by thefour magnetic field sensing elements of FIG. 13;

FIG. 15 is a graph representative of signal that can be generated by theelectronic circuit of FIG. 13

FIG. 16 is a block diagram showing further details of an example of anelectronic circuit that can be used as the electronic circuit of FIG.13;

FIG. 17 is an exploded view of an example of a magnetic field sensorthat can include the electronic circuit of FIGS. 13 and 16 and the firstmagnet described above to form part of the above-described, magneticassemblies;

FIG. 18 is a side view cross section of the magnetic field sensor ofFIG. 17 when assembled;

FIG. 19 is a side view cross section of another magnetic field sensorthat can include the electronic circuit of FIGS. 13 and 16 and the firstmagnet described above to form part of the above-described magneticassemblies; and

FIG. 20 is a side view showing yet another magnetic assembly havingfirst and second magnets and an electronic substrate disposed betweenthe first and second magnets;

FIG. 21 is a top view of the magnetic assembly of FIG. 20;

FIG. 22 is a top view of an electronic substrate having two magneticfield sensing elements and an electronic circuit that can be used as oneof the above-mentioned electronic substrates; and

FIG. 23 is a top view of an electronic substrate having three magneticfield sensing elements and an electronic circuit that can be used as oneof the above-mentioned electronic, substrates.

DETAILED DESCRIPTION

Before describing the present invention, it should be noted thatreference is sometimes made herein to magnetic assemblies havingmagnetic components with particular shapes (e.g., spherical). One ofordinary skill in the art will appreciate, however, that the techniquesdescribed herein are applicable to a. variety of sizes and shapes.

As used herein, the term “magnetic field sensing element” is used todescribe a variety of electronic elements that can sense a magneticfield. The magnetic field sensing element can be, but is not limited to,a Hall effect element, a magnetoresistance element, or amagnetotransistor. As is known, there are different types of Hall effectelements, for example, a planar Hall element, a vertical Hall element,and a Circular Vertical Hall (CVH) element. As is also known, there aredifferent types of magnetoresistance elements, for example, asemiconductor magnetoresistance element such as Indium Antimonide(InSb), a giant magnetoresistance (GMR) element, for example, a spinvalve, an anisotropic magnetoresistance element (AMR), a tunnelingmagnetoresistance (TMR) element, and a magnetic tunnel junction (MTJ).The magnetic field sensing element may be a single element or,alternatively, may include two or more magnetic field sensing elementsarranged in various configurations, e.g., a half bridge or full(Wheatstone) bridge. Depending on the device type and other applicationrequirements, the magnetic field sensing element may be a device made ofa type IV semiconductor material such as Silicon (Si) or Germanium (Ge),or a type semiconductor material like Gallium Arsenide (GaAs) or anIndium compound, e.g., Indium-Antimonide (InSb).

As is known, some of the above-described magnetic field sensing elementstend to have an axis of maximum sensitivity parallel to a substrate thatsupports the magnetic field sensing element, and others of theabove-described magnetic field sensing elements tend to have an axis ofmaximum sensitivity perpendicular to a substrate that supports themagnetic field sensing element. In particular, planar Hall elements tendto have axes of sensitivity perpendicular to a substrate, while metalbased or metallic magnetoresistance elements (e.g., GMR, TMR, AMR) andvertical Hall elements tend to have axes of sensitivity parallel to asubstrate.

As used herein, the term “magnetic field. sensor” is used to describe acircuit that uses a magnetic field sensing element, generally incombination with other circuits. Magnetic field sensors are used in avariety of applications, including, but not limited to, an angle sensorthat senses an angle of a direction of a magnetic field, a currentsensor that senses a magnetic field generated by a current carried by acurrent-carrying conductor, a magnetic switch that senses the proximityof a ferromagnetic object, a rotation detector that senses passingferromagnetic articles, for example, magnetic domains of a ring magnetor a ferromagnetic target (e.g., gear teeth) where the magnetic fieldsensor is used in combination with a back-biased or other magnet, and amagnetic field sensor that senses a magnetic field density of a magneticfield.

While specific reference is made below to magnetic field sensingelements that have maximum response axes that are parallel to a surfaceof an electronic substrate, it should be recognized that other magneticfield sensing elements with magnetic maximum response axes in otherdirections may be used.

As used herein, the term “processor” is used to describe an electroniccircuit that performs a function, an operation, or a sequence ofoperations. The function, operation, or sequence of operations can behard coded into the electronic circuit or soft coded by way ofinstructions held in a memory device. A “processor” can perform thefunction, operation, or sequence of operations using digital values orusing analog signals.

In some embodiments, the “processor” can be embodied in an applicationspecific integrated circuit (ASIC), which can be an analog ASIC or adigital ASIC. In some embodiments, the “processor” can he embodied in amicroprocessor with associated program.

memory. In some embodiments, the “processor” can be embodied in adiscrete electronic circuit, which can be an analog or digital.

As used herein, the term “module” is used to describe a “processor.”

A processor can contain internal processors or internal modules thatperform portions of the function, operation, or sequence of operationsof the processor. Similarly, a module can contain internal processors orinternal modules that perform portions of the function, operation, orsequence of operations of the module.

While electronic circuit shown in figures herein may be shown in theform of analog blocks or digital blocks, it will be understood that theanalog blocks can be replaced by digital blocks that perform the same orsimilar functions and the digital blocks can be replaced by analogblocks that perform the same or similar functions. Analog-to-digital ordigital-to-analog conversions may not be explicitly shown in thefigures, but should be understood.

As used herein, the term “predetermined,” when referring to a value orsignal, is used to refer to a value or signal that is set, or fixed, inthe the factory at the time of manufacture. As used herein, the term“determined,” when referring to a value or signal, is used to refer to avalue or signal that is identified by a circuit during operation, aftermanufacture.

As used herein, the term “active electronic component” is used todescribe and electronic component that has at least one p-n junction. Atransistor, a diode, and a logic gate are examples of active electroniccomponents. In contrast, as used herein, the term “passive electroniccomponent” as used to describe an electronic component that does nothave at least one p-n junction. A capacitor and a resistor are examplesof passive electronic components.

Referring to FIG. 1, an example of a magnetic assembly 100 includes afirst magnet 110, a second magnet 104, and an electronic substrate 108disposed between the first magnet 110 and the second magnet 104. A shaft102 can be rigidly or fixedly coupled to the second magnet 104 so that,if the shaft 102 is moved, the second magnet 104 also experiencesmovement. The second magnet 104 is shown here in a zero or restingposition.

The magnetic assembly 100 will be recognized to have characteristicsrepresentative of a joystick, wherein the shaft 102 is indicative of ashaft that can be moved by a user. However, other applications arepossible other than joysticks, and while joysticks are mentionedexplicitly herein, it will be understood that movement of position ofthe second magnet 104 and other magnets described below can be detectedby electronic circuits described herein, when used in otherapplications, which may or may not have a shaft.

The electronic substrate 108 can include a plurality of magnetic fieldsensing elements, e.g. a magnetic field sensing element 108 a.

The shaft 102 and the second magnet 104 attached thereto, are subject tomovement, which is detected by the magnetic field sensing elements uponthe electronic substrate 108 in ways described more fully below.

The electronic substrate 108 has a major planar surface 108 a. Thisfirst magnet 110 has a north pole 110 a and a south pole 110 b, a linebetween which is substantially perpendicular to the major planar surface108 a of the electronic substrate 108.

The second magnet 104 has a north pole 104 a and a south pole 104 b, aline between which is substantially perpendicular to the major planarsurface 108 a of the electronic substrate 108 when the second magnet 104is at the zero resting position.

The first and second magnets 110, 104, respectively, have a magneticforce therebetween, resulting in a restoring force upon the secondmagnet 104, such that the second magnet 104 will achieve the positionshown when no other force is applied to the second magnet 104.

In this position, it will be appreciated that in a region between thefirst magnet 110 and the second magnet 104, magnetic flux lines passthrough the electronic substrate 108 in a direction substantiallyperpendicular to the major planar surface 108 a of the electronicsubstrate 108.

In some embodiments, the second magnet 104 can be disposed in a cavity106 having a cavity surface 106 a. The cavity surface 106 a can becurved or flat, In some embodiments, the second magnet 104 issubstantially spherical.

In some embodiments, the electronic substrate 108 is part of a magneticfield sensor that includes not only the magnetic field sensing elements,e.g., 109 a, upon the electronic substrate 108, but also otherelectronics, including active and/or passive electronic components, Sometypes of magnetic field sensors are shown in FIGS. 13 and 16-19. In someembodiments, the first magnet 110 forms a part of a magnetic fieldsensor.

The substrate 108 is shown to be larger than the second magnet 104.However, typically, the substrate 108 is smaller than the magnet 104(here and in figures below).

In some embodiments, the second magnet 104 has a spherical shape with adiameter of about 0.25 inches. In some embodiments, the first magnet 110is a solid cylinder with a diameter of about 0.25 inches and a thicknessof about 0.125 inches.

Coordinate axes 112 are used here and in figures below to show a commonreference frame.

Referring now to FIG. 2, in which like elements of FIG. 1 are shownhaving like reference designations, the electronic substrate 108 isshown to have first, second, third, and fourth magnetic field sensingelements 108 a, 108 b, 108 c, 108 d, respectively. In some embodiments,the four magnetic field sensing elements 108 a, 108 b, 108 e, 108 d aredisposed at corners of the square, such that a line between the firstand third magnetic field sensing elements 108 a, 108 c, respectively,and a line between the second and fourth magnetic field sensing elements108 b, 108 d are perpendicular to each other. However, other angles arealso possible.

The first magnetic field sensing element 108 a has a directional maximumresponse axis 116, the second magnetic field sensing element 108 b as adirectional maximum response axis 118, the third magnetic field sensingelement 108 c has a maximum response axis 120, and the fourth magneticfield sensing element 108 d has a directional maximum response axis 122.

In some embodiments, the four directional response axes 116, 118, 120,122 can be parallel to the major planar surface 108 a of the electronicsubstrate 108.

In some embodiments, the directional response axes 116, 120 can heparallel to each other but in opposite directions. Also, the directionalresponse axes 118, 122 can be parallel to each other but in oppositedirections.

In some embodiments, the directional axes 116, 120 can be perpendicularto the directional axes 118, 122. However, other angles are alsopossible.

Maximum response axes are not shown in figures below, however, it willbe understood that a similar maximum response axes apply to the variousfigures below.

In some embodiments, the arrangement of magnetic field sensing elementsis in a square, e.g., the substrate 108, with sides about 1.14 mm long.However, the substrate 108 can be larger or smaller. The square shape ofthe substrate 108 can he representative of the substrate, or insteadrepresentative of the arrangement of the magnetic field sensing elements109 a, 109 b, 109 c, 109 d, in which case, the substrate can be largerthan the square shape shown.

Coordinate axes 114, shown here and in figures below, show the samereference frame as the coordinate axes 112 of FIG. 1.

Referring to FIG. 3, in which like elements of FIG. 1 are shown havinglike reference designations, the second magnet 104 has been rotated, forexample by a user applying a force upon a shaft 102, and there is arestoring force represented by an arrow. If the user were to release theshaft, the second magnet 104 would return to its position shown above inconjunction with FIG. 1.

It should be recognized that rotation of the second magnet can cause thesecond magnet 104 to move laterally along the surface 106 a of thecavity 106.

Referring now to FIG. 4, in a top view, in which like elements of FIG. 1are shown having like reference designations, it can be seen that thesecond magnet 104 has moved laterally relative to the electronicsubstrate 108 and to the first magnet 110. The first magnet 110 can bestationary relative to the electronic substrate 108.

Lateral movement of the second magnet 104 may not be desirable.

Referring now to FIG. 5, in which like elements of FIG. 1 are shownhaving like reference designations, another magnetic assembly 500 islike the magnetic assembly 100 of FIG. 1, however, a different cavity502 having a different cavity surface 502 a is used

The cavity 502 allows the second magnet 104 to rotate, but keeps thesecond magnet in place and not able to move laterally.

Referring now to FIG. 6, in a top view, in which like elements of FIG. 1are shown having like reference designations, the second magnet 104 issubstantially centered with the four magnetic field sensing elements.

Referring now to FIG. 7, in which like elements of FIG. 1 are shownhaving like reference designations, the magnetic assembly 500 is shownagain where the second magnet 104 has been rotated, for example, by aforce applied by user upon a shaft 102. A restoring force, describedabove in conjunction with FIG. 3, is represented by an arrow.

Referring now to FIG. 8, in a top view, in which like elements of FIG. 1are shown having like reference designations, even though the secondmagnet 104 is rotated, the second magnet 104 substantially centered withthe four magnetic field sensing elements.

Referring now to FIG. 9, another example of a magnetic assembly 900includes a first magnet 910, a second magnet 904, and an electronicsubstrate 908 disposed between the first magnet 910 and the secondmagnet 904. A shaft 902 is rigidly or fixedly coupled to the secondmagnet 904 so that, if the shaft 902 is moved, the second magnet 904also experiences movement. The second magnet 904 is shown here in a zeroor resting position.

The magnetic assembly 900 will be recognized to have characteristicsrepresentative of a joystick, wherein the shaft 902 is indicative of ashaft that can be moved by a user. However, other applications arepossible other than joysticks, and while joysticks are mentionedexplicitly herein, it will be understood that movement of position ofthe second magnet 904 and other magnets described below can be detectedby electronic circuits described herein, when used in otherapplications.

The electronic substrate 908 can include a plurality of magnetic fieldsensing elements.

The shaft 902, and the second magnet 904 attached thereto, are subjectto movement, which is detected by the magnetic field sensing elementsupon the electronic substrate 908 in ways described more fully below.

The electronic substrate 908 has a major planar surface 908 a. Thisfirst magnet 910 has a north pole 910 a and a south pole 910 b, a linebetween Which is substantially perpendicular to the major planar surface908 a of the electronic substrate 908.

The second magnet 904 has a north pole 904 a and a south pole 904 b, aline between which is substantially perpendicular to the major planarsurface 908 a of the electronic substrate 908 when the second magnet 904is at the zero resting position.

The first and second magnets 910, 904, respectively, have a magneticforce therebetween, resulting in a restoring force upon the secondmagnet 904, such that the second magnet 904 will achieve the positionshown when no other force is applied to the second magnet 904.

In this position, it will be appreciated that in a region between thefirst magnet 910 and the second magnet 904, magnetic flux lines passthrough the electronic substrate 908 in a direction substantiallyperpendicular to the major planar surface 908 a of the electronicsubstrate 108.

In some embodiments, the second magnet 904 can be disposed in a cavity906 having a cavity surface 906 a. The cavity surface 908 a can becurved or flat

In some embodiments, the second magnet 904 is substantially cylindrical,with or without a void center part.

In some embodiments, the electronic substrate 908 is part of a magneticfield sensor that includes not only the magnetic field sensing elements,e.g., 109 a, upon the electronic substrate 108, but also otherelectronics, including active and/or passive electronic components. Sometypes of magnetic field sensors are shown in FIGS. 13 and 16-19. In someembodiments, the first magnet 110 forms a part of a magnetic fieldsensor.

In some embodiments, the arrangement of magnetic field sensing elementsis in a square, e.g., the substrate 908, with sides about 1.14 mm long.However, the substrate 908 can be larger or smaller. The square shape ofthe substrate 908 can be representative of the substrate, or insteadrepresentative of the arrangement of the magnetic field sensingelements, e.g., 909 a, in which case, the substrate can. be larger thanthe square shape shown.

In some embodiments, the second magnet 904 has a cylindrical shape witha diameter of about 0.25 inches and a thickness of about 0.125 inches.In some embodiments, the second magnet 904 is an open cylinder with an.internal diameter of about 0.125 inches.

In some embodiments, the first magnet 910 has a cylindrical shape with adiameter of about 0.25 inches and a thickness of about 0.125 inches. Insome embodiments, the first magnet 910 is an open cylinder with aninternal diameter of about 0.125 inches.

Coordinate axes 112 are the same as coordinate axes 112 in figuresabove.

Referring now to FIG. 10, in which like elements of FIG. 9 are shownhaving like reference designations, the electronic substrate 908 isshown to have four magnetic field sensing elements, e.g., 909 a. Asdescribed above in conjunction with FIG. 2, in some embodiments, thefour magnetic field sensing elements are disposed at corners of thesquare, such that a line between opposite ones of the four magneticfield sensing elements and a line between other opposite ones of thefour magnetic field sensing elements are perpendicular to each other.However, other angles are also possible.

Directional maximum response axes and orientations thereof can be thesame as or similar to those described above in conjunction with FIG. 2.

Coordinate axes 114 are the same as coordinate axes 114 in figuresabove.

Here; the second magnet 904 has a center void, such that the secondmagnet 904 is in the form of a cylindrical ring. En some embodiments,the first magnet 910 is also in the form of a cylindrical ring. However,in other embodiments, either one of, or both of, the magnets can be inthe form of solid cylinders.

Referring to FIG. 11, in which like elements of FIG. 9 are shown havinglike reference designations, the second magnet 904 has been rotated, forexample by a user applying a force upon a shaft 902. A restoring force,described above in conjunction with FIG. 3, is represented by an arrow.If the user were to release the shaft, the second magnet 904 wouldreturn to its position shown above in conjunction with FIG. 9.

It should be recognized that rotation of the second magnet 904 causesthe second magnet to move laterally along the surface 906 a of thecavity 906.

Referring now to FIG. 12, in a top view, in which like elements of FIG.9 are shown having like reference designations, it can be seen that thesecond magnet 904 has moved laterally relative to the electronicsubstrate 908 and relative to the first magnet 910.

Lateral movement of the second magnet 904 may not be desirable. Thefirst magnet 910 can be stationary relative to the electronic substrate908.

Referring now to FIG. 13, an electronic substrate 1300 can be the sameas or similar to the electronic substrates 108, 908 described above.Upon the electronic substrate 1300 can be disposed first, second, third,and fourth magnetic field sensing elements 1302 a, 1302 b, 1302 c, 1302d, respectively.

The first, second, third, and fourth magnetic field sensing elements1302 a, 1302 b, 1302 c, 1302 d are shown in a form more representativeof vertical Hall elements. As is known, a typical vertical Hall elementhas vertical Hall element contacts, e.g., five vertical Hall elementcontacts as shown by small boxes, arranged in a row, In operation, acurrent is passed between some of the contacts, and a differentialvoltage output signal is generated at two of the contacts. A polarity,i.e., a direction of a directional maximum response axis, can beswitched merely by switching the two contacts at which the differentialoutput voltage is generated.

Accordingly, the first, second, third, and fourth magnetic field sensingelements 1302 a, 1302 b, 1302 c, 1302 d have respective first, second,third, and fourth directional maximum response axes 1303 a, 1303 b, 1303c, 1303 d, respectively. The directional maximum response axes 1303 a,1303 b, 1303 c, 1303 d have the same characteristics as the directionmaximum response axes 116, 118, 120, 122 of FIG. 2.

Current spinning or chopping is a known technique used to reduce DCoffset voltage (i.e., residual DC voltage when in the presence of zeromagnetic field) of a Hall element, Current spinning can be used for bothplanar (horizontal) and vertical Hall elements. With current spinning,Hall element contacts that are driven and Hall element contacts at whicha differential output voltage is generated, are changed or switched at achopping rate. For each change of the connections, the Hall elementtends to generate a different offset voltage. When the different DCoutput voltages are taken together, i.e., averaged, the net DC offsetvoltage is greatly reduced.

The first, second, third, and fourth magnetic field sensing elements1302 a, 1302 b, 1302 c, 1302 d can generate a respective first, second,third, and fourth electronic magnetic field signals 1304 a, 1304 b, 1304c, 1304 d, respectively. In some embodiments, the first, second, third,and fourth electronic magnetic field signals 1304 a, 1304 b, 1304 c,1304 d are differential signals, but are here shown as individualconnections.

An electronic circuit 1308 can be coupled to receive the first, second,third, and fourth magnetic field signals 1304 a, 1304 b, 1304 c, 1304 d,respectively. The electronic circuit 1308 can also be configured togenerate one or more drive signals 1306 that can drive the magneticfield sensing elements 1302 a, 1302 b, 1302 c, 1302 d.

Angles (e.g., of the shaft 102 of FIG. 3) projected in the x-y plane arereferred to herein as direction angles. A direction angle can be an xdirection angle relative to the x-axis, or a y direction angle relativethe x-axis. Angles (e.g., of the shaft 102 of FIG. 3) relative to thez-axis are referred to herein as tilt angles.

The electronic circuit 1308 is configured to generate one or more outputsignals, which can include, but which are not limited to, an xdifference signal 1308 a representative of, for example, a projection ofthe shaft 102 of FIG. 3 upon the x-axis of the x-y plane, output ydifference signal 1308 b representative of, for example, a projection ofthe shaft 102 of FIG. 3 upon the y-axis of the x-y plane, an x directionangle signal 1308 c representative of, for example, an angle between aprojection of the shaft 102 of FIG. 3 in the x-y plane and the x axis, ay direction angle signal 1308 d is representative of, for example, anangle between a projection of the shaft 102 of FIG. 3 the x-y plane andthe y-axis, or a tilt angle signal 1308 e representative of, forexample, a z tilt angle of the shaft 102 of FIG. 3 relative to thez-axis perpendicular to the x-y plane. The electronic circuit 1308 isdescribed more fully below in conjunction with FIG. 16.

In some embodiments, the first, second, third, and fourth magnetic fieldsensing elements 1302 a, 1302 b, 1302 c, 1302 d, respectively, hereshown to be vertical Hall elements, can instead be magnetoresistanceelements. Magnetoresistance elements are not used with current spinningor chopping.

Magnetoresistance elements can be formed in a variety of shapes whenviewed from the top. For example, in some embodiments magnetoresistanceelements can be formed in a bar shape wherein the directional maximumresponse axis is perpendicular to the longest axis of the bar. In otherembodiments, the magnetoresistance elements can be formed in a yokeshape having a longest side and the maximum response axis can heperpendicular to the length of the longest side.

Referring now to FIG. 14, a graph 1400 has a horizontal axis in with ascale in units of degrees. Degrees are indicative of a projected ydirection angle of the shaft 102 of FIG. 3 in the x-y plane relative tothe y-axis as the shaft is moved in a circle about its zero position,i.e., around the z-axis. The graph 1400 also has a vertical axis with ascale in units of a sensed magnetic field in Gauss, as sensed by thefour magnetic field sensing elements of figures herein.

A signal 1402 is representative of an output signal from one of themagnetic field sensing elements most sensitive to magnetic fieldparallel to the y-axis, for example, the magnetic field sensing element109 a of FIG. 2, as the shaft 102 of FIG. 3 is moved in a circle aroundthe z-axis, (i.e., to different direction angles but at a fixed tiltangle). A signal 1404 is representative of an output signal from anopposite one of the magnetic field sensing elements, sensitive tomagnetic field parallel to the y-axis, for example, the magnetic fieldsensing element 109 c of FIG. 2. Signals 1402 and 1404 are one hundredeighty degrees apart.

A signal 1406 is representative of an output signal from one of themagnetic field sensing elements sensitive to magnetic field parallel tothe x-axis, for example, the magnetic field sensing element 109 b ofFIG. 2, as the shaft 102 of FIG. 3 is moved in a circle around thez-axis, (i.e., to different direction angles but at a fixed tilt angle).A signal 1408 is representative of an output signal from an opposite oneof the magnetic field sensing elements sensitive to magnetic fieldparallel to the x-axis, for example, the magnetic field sensing element109 d of FIG. 2. Signals 1406 and 1408 are one hundred eighty degreesapart.

It can be seen that, different ones of the signals 1402, 1404, 1406,1408 achieve positive maximum values at different direction angles,i.e., as the shaft 102 of FIG. 3 points toward different ones of themagnetic field sensing elements 109 a, 109 b, 109 c, 109 d.

It should be appreciated that an absolute amplitude of the signals 1402,1404, 1406, 1408 is dependent upon the tilt angle of the shaft 102relative to the z-axis. The amplitudes can be greater for greater tiltangles relative to the z-axis. However, the phase relationships (andratios of signals for any projected y direction angle) remain the same.

The indicated phase relationships are indicative of four magnetic fieldsensing elements having orthogonal maximum response axes. However, inother embodiments, other relationships between directions of the maximumresponse axes can result in other phase relationships of the signals1402, 1404, 1406, 1408. For example, in conjunction with the arrangementof FIGS. 20 and 21 having three magnetic field sensing elements spacedone hundred twenty degrees apart results in three sinusoids that are onehundred twenty degrees apart in phase.

Circuits described in further detail below can, in some embodiments,take difference measurements between pairs of the signals 1402, 1404,1406, 1408. Values 1402 a, 1404 a, 1406 a, 1408 a are representative ofa thirty degree y direction angle relative to the y-axis, (i.e.,projected angle in the x-y plane relative to the y-axis) and also atwenty degree z tilt angle (i.e., angle over and relative to the x-yplane).

It is desirable that the magnetic field sensing elements describedherein have maximum. response axes in the x and y directions. In someembodiments, circuits described in further detail below take differencemeasurements between pairs of the signals 1402, 1404, 1406, 1408, forexample a difference of values 1402 a and 1404 a referred to herein as ay difference signal, and a difference of values 1406 a and 1408 a,referred to herein as an x difference signal. Difference measurementsallow for rejections of effects that may result from the large magneticfields between the first and second magnets that are directed along thez-axis.

As indicated above, it should be understood that, for larger z tiltangles relative to the z-axis, the signals 1402, 1404, 1406, 1408 arelarger, and the y difference signal and x difference are signal alsolarger.

Referring now to FIG. 15, a graph 1500 has a horizontal axis with ascale in arbitrary unit indicative of an x difference signal, forexample, a difference of the signals 1406, 1408 of FIG. 14. The graph1500 also has a vertical axis with a scale in arbitrary units indicativeof a y difference signal, for example, a difference of the signals 1402,1404 of FIG. 14.

An arrow 1506 is representative of a top view looking down on any ofmagnetic assemblies above, for example, looking down at the shaft 102 ofthe figures above. The arrow is representative of a projection upon thex-y plane.

Direction angles θand θy are shown. A z tilt angle θz comes out of thepage,

It should be apparent that by knowing a value 1512 of an x differencesignal and a value 1510 of a y difference signal, the direction anglesθx and θy of the arrow 1506 in the x-y plane can be determined, forexample by:

x direction angle=θx=arctan(x/y),   (1)

where:

x=value of the x difference signal, and

y=value of the y difference signal.

y direction angle=θy=arctan(y/x),   (2)

It should also be apparent that the length of the arrow 1506 can change,for example, to an arrow 1508, for different z tilt angles of the shaft102 of figures above relative to the z-axis. The different tilt anglecan result in a different value of the x difference signal and adifferent value of the y difference signal, but the same ratio of thevalues when the pointing angle (in the x-y plane) remains the same.

It should also be apparent that the z tilt angle (relative to thez-axis) can also be computed by knowing the value (e.g., 1512) of the xdifference signal and the value (e.g., 1510) of the y difference signal.For example, the two values can be used to identify a length of theprojected arrow, e.g., 1506, or 1508. In essence, the length of thearrow 1506 or 1508 (a projection upon the x-y plane) is proportional tothe z tilt angle.

In some embodiments, the length of the projected arrow can be computedby:

L=sqrt(x ² +y ²),   (3)

where:

L=length of projected arrow,

x=value of the x difference signal, and

y=value of the y difference signal.

It should be appreciated that the length, L, of the arrow can vary in away that is not only related to tilt angle. For example, if the shaft102 of FIG. 1 does not pivot about a fixed point, another geometricrelationship can be related to the length, L. However, the othergeometric relationship may be known, and thus, it may still be possibleto establish a tilt angle using calibrations described below, incombination with the known geometric relationship.

In some embodiments, in order to identify the z tilt angle from thecomputed length, L, of the arrow (e.g., 1506 or 1508), a calibration isperformed. For example, taking the magnetic assembly of FIGS. 1-4, theshaft 102 can be tilted to a maximum possible tilt angle θztiltmax,which is limited by mechanical considerations, to a known maximum angle.A maximum length of the projected arrow, Linux, (projected into the x-yplane), i.e., a maximum diameter of a circle, e.g., 1502, 1504, can becomputed by equation (3) above.

Knowing Lmax, and corresponding maximum tilt angle θtiltmax, then othertilt angle can be identified as follows:

tan (θztiltmax)=Lmax/K,   (4)

where:

θztiltmax maximum z tilt angle,

Lmax=maximum length of the projection onto the x-y plane, and

K=a constant (equivalent to a constant unprojected length of the arrow).

θz=arctan (L/K),   (5)

where:

θz z tilt angle

K=constant computed by equation (4), and

L=length of projected arrow computed by equation (3).

In other embodiments, a predetermined value is used for the aboveconstant K, and there is no calibration. Equation 5 can be used tocompute the z tilt angle using the predetermined constant K.

In other embodiments, the value, K, is not constant, but can be measuredat a variety of projected arrows, L, in which case, the z tilt angle,θz, can be interpolated using the variety of K and L values.

In other embodiments, an algorithm can be used to compute K in relationto L

Referring now to FIG. 16, an electronic circuit 1600 can form a part ofa magnetic field sensor and can be disposed upon the electronicsubstrate 1300. The electronic circuit 1600 can include for magneticfield sensing elements 1604, 1606, 1608, 1610, here shown to havegraphical shapes representative of vertical Hall elements. Fromdiscussion above in conjunction with FIG. 13, physical arrangement andmaximum response axes will be understood. Here, however the fourmagnetic field sensing elements 1604, 1606, 1608, 1610 are shown in aline for clarity of the block diagram.

In some embodiments, the four magnetic field sensing element 1604, 1606,1608, 1610 can be coupled to so-called “dynamic offset cancellation”modules 1612, 1614, 1616, 1618, respectively. The dynamic offsetcancellation modules 1612, 1614, 1616, 1618 perform the above-describedcurrent spinning or chopping.

Output signals from the dynamic offset cancellation module 1612, 1614,1616, 1618 are coupled to first and second differential amplifiers 1620,1626 as shown.

In some alternate embodiments, there are no dynamic offset cancellationmodules, and instead, the differential output signals from the fourvertical Hall elements 1604, 1606, 1608, 6010 coupled directly to firstand second differential amplifier 1620, 1626, respectively.

It is intended, that signals associated the four magnetic field sensingelements 1604, 1606, 1608, 1610 couple to proper ones of the first andsecond differential amplifiers 6020, 6028. In essence, referring brieflyto FIG. 13, it is intended that the signals associated with the verticalHall elements 1302 b, 1302 d couple to the first differential amplifier1620, and signals associated with the vertical Hall elements 1302 a,1302 c coupled to the second differential amplifier 1628. Thus, itshould be appreciated that the first differential amplifier 1620 isassociated with an x-axis electronic channel and the second differentialamplifier 1626 is associated with a y-axis electronic channel.

The first differential amplifier 1620 is configured to generate an xdifference signal 1620 a.

An electronic filter 1622 can be coupled to receive the x differencesignal 1620 a and configured to generate a filtered signal 1622 a. Insome embodiments, the tuned filter 1622 is a low pass filter able topass DC signals, but acting to reduce electronic noise.

A gain stage 1624 can be coupled to receive the filtered signal 1622 aand configured to generate an amplified x difference signal 1624 a.

The second differential amplifier 1626 is configured to generate a ydifference signal 1626 a.

An electronic filter 1628 can be coupled to receive the y differencesignal 1626 a and configured to generate a filtered signal 1628 a. Insome embodiments, the tuned filter 1628 is a low pass filter able topass DC signals, but acting to reduce electronic noise.

A gain stage 1630 can be coupled to receive the filtered signal 1628 aand configured to generate an amplified y difference signal 1630 a.

The electronic circuit 1600 can include a direction angle processor 1634coupled to receive the x difference signal 1624 a and coupled to receivethe y difference signal 1630 a. By use of equations one and two above,the direction angle processor 1634 is configured to generate at leastone of an x direction angle signal 1634 a or a y direction angle signal1634 b.

The electronic circuit can include a tilt angle processor 1634 coupledto receive the x difference signal 1624 a and coupled to receive the ydifference signal 1630 a. By use of equations three, four, and fiveabove, the tilt angle processor 1634 is configured to generate a tiltangle signal 1636 a.

In some embodiments, the direction angle processor 1634 and/or the tiltangle processor 1636 are analog processors. However, in otherembodiments, the direction angle processor 1634 and/or the tilt angleprocessor 1636 are digital processors, For these digital embodiments,analog-to digital converters (DACS) (not shown) are disposed between thegain stages 1624, 1628 and the processors 1634, 1636.

In other embodiments, analog to digital conversions are made earlier,for example, prior to the tuned filters 1622, 1628, and the tunedfilters 1622, 1628 are digital filters, and circuits that follow aredigital circuits.

In some alternate embodiments, the electronic circuit 1600 does notinclude the tilt angle processor 1636. In some other alternateembodiments, the electronic circuit 1600 does not include the directionangle processor 1634. In some other alternate embodiments, theelectronic circuit 1600 does not include the direction angle processor1634 or the tilt angle processor 1636.

In some embodiments, the x difference signal 1624 a and the y differencesignal 1630 a are provided to other circuits that are not a part of theelectronic circuit 1600.

It should be understood that the x difference signal 1624 a and the ydifference signal 1630 a provide an ability to reject common moderesponses of individual magnetic field sensing elements used in thedifference signals that may respond in-part to z-components of magneticfields between the first and second magnets of FIGS. 1-12. Othercircuits described below have two magnetic field sensing elements orthree magnetic field sensing elements.

In some embodiments, the electronic circuit 1600 can include an outputformat processor 1636 coupled to receive one or more of the signals 1624a, 1630 a, 1634 a, 1634 b, 1636 a and configured to generate a serial orparallel output signal 1638 a having information related to the one ormore of the received signals. Example formats of the signal 1638 ainclude, but are not limited to, a SENT format, and SPI format, and I²Cformat, and a serial format.

In some embodiments, the electronic circuit 1600 can include acalibration memory 1640 configured to store and provide calibrationvalues 1640 a, for example, according to the calibration described abovein conjunction with FIG. 15.

While two parallel channels are shown in the electronic circuit 1600,other arrangements are also possible. For example, in one alternateembodiment samples from the four magnetic field sensing elements 1604,1606 1608, 1610 are taken sequentially in a time division multiplexed(TDM) arrangement. The samples can be digitized, filtered, amplified,and sent to the common processor for processing equivalent to processingdescribed above in conjunction with equations one through five.

Referring briefly to equations (1) and (2) above, it should berecognized that the x difference signal 1620 a and the y differencesignal 1620 b are relatively independent from each other with movementor rotation of the second magnet, e.g., 104 of FIG. 1, due to theirdifferential nature. Namely, a rotation or movement of the second magnet(e.g., 104 of FIG. 1) in the x direction, results in a change of the xdifference signal 1620 a, but results in little or no change of the ydifference signal 1626 a, and vice versa. Being independent, equations(1) and (2) can generate particularly accurate x direction angles and ydirection angels, however, the calibration values 1640 a can alsoprovide further calibration related to equations (1) and (2).

Referring now to FIG. 17, a magnetic field sensor 1700 can include anintegrated circuit 1706, which, for example, can be a packaged versionof the electronic circuit 1600 of FIG. 16.

The magnetic field sensor 1700 can include a housing 1702 having acavity 1704.

The magnetic field sensor 1700 can include a spacer, for example, aninsulating spacer 1710.

The magnetic field sensor 1700 can include a magnet 1712, which can bethe same as or similar to the magnets 110, 910 described in figuresabove.

The magnetic field sensor 1700 can also include a ceiling member 1714.

While the magnetic field sensor 1700 is shown in exploded form, themagnetic field sensor 1700 is shown and assembled form in FIG. 18 below.

Referring now to FIG. 18, in which like elements of FIG. 17 are shownhaving like reference designations, a magnetic field sensor 1800 is thesame as or similar to the magnetic field sensor 1700 of FIG. 17, but ishere shown and assembled form.

The integrated circuit 1706 can include an electronic substrate 1802disposed over a base plate 1804 of a lead frame. The integrated circuit1706 can include a molding, for example, a plastic molding 1806.

It will be appreciated that the above described second magnets, e.g.,104, 904 and associated cavities 106, 502, 906 can he disposed over themagnetic field sensor 1800.

It will be apparent that, the arrangement of the magnetic field sensor1800 includes the magnet 1712. However, in other embodiments themagnetic field sensor only includes the integrated circuit 1706.

Referring now to FIG. 19, in which like elements of FIG. 17 are shownhaving like reference designations, another magnetic field sensor 1900can include an electronic substrate 1802 disposed over a base plate1804. Here, however, instead of the plastic molding 1806 of FIG. 18, themagnetic field sensor 1900 includes but one molded structure 1902surrounding electronic circuit substrate 1802, the base plate 1804, theinsulating spacer 1710, and the magnet 1712.

It will be appreciated that the above described second magnets, e.g.,104, 904 and associated cavities 106, 502, 906 can be disposed over themagnetic field sensor 1900.

In some alternate embodiments, the magnetic field sensor 1900 does notinclude the magnet 1712.

Referring now to FIG. 20, in which like elements of FIG. 1 are shownhaving like reference designators, a magnetic assembly 2000 is like themagnetic assembly 100 of FIG. 1, but the magnetic assembly 2000 has adifferent substrate 2002 with a surface 2002 a, and with a differentquantity of magnetic field sensing elements, e.g. 2004 a, shown indescribed in more detail below in conjunction with FIG. 21. Anattractive force of first and second magnets 110, 104 results in arestoring force upon the second magnet 104, and therefore, upon theshaft 102

Referring now to FIG. 21, in which like elements of FIG. 20 are shownhaving like reference designations, the substrate 2002 can have aplurality of magnetic field sensing elements, e.g., three magnetic fieldsensing elements 2004 a, 2004 b, 2004 c. The three magnetic fieldsensing elements 2004 a, 2004 b, 2004 c can have directional maximumresponse axes 2006, 2008, 2010, each parallel to the surface 2004 a ofthe substrate 2004, but each pointing in a different direction.

In some embodiments, signals generated by the three magnetic fieldsensing elements 2004 a, 2004 b, 2004 c are amplified, digitized, andprovided as inputs to a processor. The processor can be configured togenerate at least an x signal and a y signal. The x signal can berepresentative of, for example, a projected x-axis value indicative of aprojection of the shaft 102 upon the x-axis of the x-y plane. The ysignal can he representative of, for example, a projected y-axis valueindicative of a projection of the shaft 102 upon the y-axis of the x-yplane.

To generate the x signal and the y signal, the above described processorcan use equations different than equations 1 and 2 above, In someembodiments, the processor can use equations the same as or similar toequations described in U.S. patent application Ser. No. 13/960,910,filed Aug. 7, 2013, and entitled “Systems and Methods for Computing aPosition of a Magnetic Target,” which is assigned to the assignee of thepresent invention, and which is incorporated by reference herein in itsentirety. These equations are described below.

In some embodiments, the above described processor can also useequations the same as or similar to equations 3, 4, and/or 5 describedabove to compute direction angles and/or a tilt angle. Discussion ofcalibration above also applies to the magnetic assembly 2000.

Referring now to FIG. 22, an electronic substrate 2200 can be the sameas or similar to the electronic substrates 108, 908 described above.However, unlike the substrates 108, 908, which can include four magneticfield sensing elements, upon the electronic substrate 2200 can bedisposed two magnetic field sensing elements, for example, first andsecond magnetic field sensing elements 2216 a, 2216 b, respectively.

The first and second magnetic field sensing elements 2216 a, 2216 b areshown in a form representative of vertical Hall elements. Vertical hallelements are described above.

Accordingly, the first and second magnetic field sensing elements 2216a, 2216 b have respective first and second directional. maximum responseaxes 2218 a, 2218 b respectively. The directional maximum response axes2218 a, 2218 b have the same characteristics as the maximum responseaxes 116, 118 of FIG. 2.

Current spinning or chopping can be used with the magnetic field sensingelements 2216 a, 2216 b as described above in conjunction with FIG. 13.

The first magnetic field sensing elements 2216 a can generate a firstelectronic magnetic field signal 2214 a, which is responsive to magneticfields in the y direction, and second magnetic field sensing elements2216 b can generate a second electronic magnetic field signal 2214 b,which is responsive to magnetic fields in the x direction.

The first and second electronic magnetic field, signals 2214 a, 2214 bcan be differential signals, each generated by a respective individualmagnetic field sensing element, but are here shown as individualconnections.

An electronic circuit 2202 can include first and second amplifiers 2204,2206 coupled to receive the first and second magnetic field signals 2214a, 2214 b, respectively and configured to generate first and secondrespective amplified signals 2204 a, 2206 a, respectively.

Optionally, the electronic circuit 2200 can include an x-y processor2226 coupled to receive the first and second amplified signals 2204 a,2206 a, configured to apply a calibration, and configured to generate anx signal 2202 a and a y signal 2202 b, respectively. This calibration isdescribed more fully below. In other arrangements, the first and secondamplified signals 2204 a, 2206 can essentially bypass the x-y processor2226.

The electronic circuit 2202 can also be configured to generate one ormore drive signals 2212 that can drive the magnetic field sensingelements 2216 a, 2216 b.

It will be apparent that, having the two magnetic field signals 2214 a,2214 b, there need not be a difference of signals, e.g., viadifferential amplifiers 1620, 1626 of FIG. 16 that would be used forfour magnetic field signals. Instead, the x signal 2202 a and the ysignal 2202 b can be indicative of responses from individual ones of thefirst and second magnetic field sensing elements 2218 a, 2218 b,respectively.

With non-differencing arrangements, unlike the differencing of signalsof the magnetic field sensor 1600 of FIG. 16, the electronic magneticfield signals 2214 a, 2214 b are not necessarily fully independent. inother words, a movement of the shaft 102 of FIGS. 1 and 2 in the ydirection might result not only result in a desired change of theelectronic magnetic field single 2214 a responsive to the y direction,but also in some undesirable change of the electronic magnetic fieldsignal 2214 b in the x direction. However, even with the above describedarrangement that bypasses the x-y processor, still the x signal 2202 aand the y signal 2202 b might be sufficiently independent to result insufficiently accurate signals among an x direction angle value 2202 c, ay direction value 2202 d, and a z tilt angle value 2202 e describedbelow.

As described above, angles (e.g., of the shaft 102 of FIG. 3) projectedin the x-y plane are referred to herein as direction angles. A directionangle can be an x direction angle relative to the x-axis, or a ydirection angle relative the x-axis. Angles (e.g., of the shaft 102 ofFIG. 3) relative to the z-axis are referred to herein as tilt angles.

The electronic circuit 2202 is configured to generate one or more outputsignals, which can include, but which are not limited to, the x signal2202 a (a non-difference signal) representative of, for example, aprojection of the shaft 102 of FIG. 3 upon the x-axis of the x-y plane,the y signal 2202 b (a non-difference signal) representative of, forexample, a projection of the shaft 102 of FIG. 3 upon the y-axis of thex-y plane, the x direction angle signal 2202 c representative of, forexample, a projection of the shaft 102 of FIG. 3 in the x-y plane andrelative to the x-axis, the y direction angle signal 2202 drepresentative of, for example, a projection of the shaft 102 of FIG. 3projected in the x-y plane and relative to the y-axis, or the z tiltangle 2202 e representative of, for example, a z tilt angle of the shaft102 of FIG. 3 relative to the z-axis perpendicular to the x-y plane.

In some embodiments, the first and second magnetic field sensingelements 2216 a, 2216 b, respectively, here shown to he vertical Hallelements, can instead be magnetoresistance elements. Magnetoresistanceelements are not used with current spinning or chopping.

In operation, referring briefly to FIG. 14, values of the signal 1402can be representative of the magnetic field signal 2214 a as an end ofthe shaft 102 of FIG. 3 is moved around a circle.

Similarly, values of the signal 1404 of FIG. 14 can be representative ofthe magnetic field. signal 2214 b as an end of the shaft 102 of FIG. 3is moved around a circle. Thus, compared to the four sinusoids of FIG.14, for the arrangement of FIG. 22, there can be only two sinusoids.Referring briefly to equations 1-5 above, similar computations for the xdirection angle, the y direction angle, the z tilt angle, and for allcomputations of equations 1-5 can be used with the magnetic field sensor2200 of FIG. 22, but, in equation (1) and (2.) using the x and y signals2202 a, 2202 b, respectively, rather than the x difference signal and ydifference signal described above in conjunction with FIG. 13.

In some embodiments, the electronic circuit 2202 can include acalibration memory 2220 to store and provide calibration values 2220 athat can be used with the x-y processor 2226 to enhance independence ofthe x signal 2202 a and the y signal 2202 b.

In some embodiments, the calibration memory 2220 is also configured tostore and provide the calibration values 2220 a, for example, accordingto the calibration described above in conjunction with FIG. 15.

In some embodiments, the electronic circuit 2202 can include an outputformat processor 2222 the same as or similar to the output formatprocessor 1638 of FIG. 16.

Referring now to FIG. 23, an electronic substrate 2300 can be the sameas or similar to the electronic substrates 108, 908 described above.However, unlike the substrates 108, 908, Which can include four magneticfield sensing elements, upon the electronic substrate 2300 can bedisposed three magnetic field sensing elements, for example, first,second , and third magnetic field sensing elements 2318 a, 2318 b, 2318c,respectively. The first, second , and third magnetic field sensingelements 2318 a, 2318 b, 2318 c can be the same as or similar to thethree magnetic field sensing elements 2006, 2008, 2010 of FIGS. 20 and21.

Accordingly, the first, second, and third magnetic field sensingelements 2318 a, 2318 b, 2318 c have respective first, second, and thirddirectional maximum response axes 2314 a, 2314 b, 2314 c, respectively,The directional maximum response axes 2314 a, 2314 b, 2314 c have thesame characteristics as the direction maximum response axes 2006, 2008,2010 of FIG. 21.

Current spinning or chopping can be used with the magnetic field sensingelements 2318 a, 2318 b, 2318 c as described above in conjunction withFIG. 13.

The first, second, and third magnetic field sensing elements 2318 a,2318 b, 2318 c can generate a respective first, second and thirdelectronic magnetic field signals 2316 a, 2316 b, 2316 c, respectively,In some embodiments, the first, second, and third electronic magneticfield signals 2316 a, 2316 b, 2316 c are differential signals asprovided by individual ones of the magnetic field sensing element 2318a, 2318 b, 2318 c, but are here shown as individual connections.

An electronic circuit 2302 can include first, second, and thirdamplifiers 2304, 2306, 2308 coupled to receive the first, second, andthird magnetic field signals 2316 a, 2316 b, 2316 c, respectively andconfigured to generate first, second, and third amplified signals 2304a, 2306 a, 2308 a, respectively.

Optionally, the electronic circuit 2200 can include an x-y processor2309 coupled to receive the first, second, and third amplified signals2304 a, 2306 a, 2308 a configured to apply a calibration, and configuredto generate an x signal 2302 a and a y signal 2302 b, respectively. Thiscalibration. is described more fully below.

The electronic circuit 2302 can also be configured to generate one ormore drive signals 2314 that can drive the magnetic field sensingelements 2318 a, 2318 b, 2318 c.

It will be apparent that, having the three magnetic field signals 2318a, 2318 b, 2318 c, there need not be a difference of signals, e.g., viadifferential amplifiers 1620, 1626 of FIG. 16 that would be used forfour magnetic field signals. instead, the x signal 2302 a and the ysignal 2302 b can be indicative of responses from combined ones of thefirst, second, and third magnetic field sensing elements 2318 a, 2318 b,2318 c, respectively, the combination being other than a differencing ofpairs of signals.

As described above, angles (e.g., of the shaft 102 of FIG. 3) projectedin the x-y plane are referred to herein as direction angles. A directionangle can be an x direction angle relative to the x-axis, or a ydirection angle relative the x-axis. Angles (e.g., of the shaft 102 ofFIG. 3) relative to the z-axis are referred to herein as tilt angles.

The electronic circuit 2302 is configured to generate one or more outputsignals, which can include, but which are not limited to, an x signal2302 a (a non-difference signal) representative of, for example, aprojection of the shall 102 of FIG. 3 upon the x-axis of the x-y plane,a y signal 2302 b (a non-difference signal) representative of forexample, a projection of the shaft 102 of FIG. 3 upon the y-axis of thex-y plane, an x direction angle signal 2302 c representative of, forexample, a projection of the shaft 102 of FIG. 3 in the x-y plane andrelative to the x-axis, a y direction angle signal 2302 d representativeof for example a projection of the shaft 102 of FIG. 3 in the x-y planeand relative to the y-axis, or a z tilt angle signal 2302 erepresentative of, for example, a z tilt angle of the shaft 102 of FIG.3 relative to the z-axis perpendicular to the x-y plane.

In some embodiments, the first, second, and third. magnetic fieldsensing elements 2318 a, 2318 b, 2318 c, respectively, here shown to bevertical Hall elements, can instead be magnetoresistance elements.Magnetoresistance elements are not used with current spinning orchopping.

In some embodiments, the three magnetic field sensing elements 2318 a,2318 b, 2318 c are not disposed in an orthogonal arrangement. In someembodiments, the three magnetic field. sensing elements 2318 a, 2318 b,2318 c are arranged one hundred twenty degrees apart.

Referring briefly to the four signals of FIG. 14, it should be apparentthat a similar three sinusoidal signals result from the three magneticfield sensing element 2318 a, 2318 b, 2318 c as the shaft 102 of FIG. 1is moved in a circle, and the three sinusoidal signals can be one undertwenty degrees apart in phase.

Referring briefly to equations 1-5 above, similar computations for the xdirection angle, the y direction angle, the z tilt angle, and for allcomputations of equations 1-5 can be used with the magnetic field sensor2300 of FIG. 23, but, in equation (1) and (2) using the x and y signals2302 a, 2302 b, respectively, rather than the x difference signal and ydifference value signal described above in conjunction with FIG. 11

In some embodiments, the electronic circuit 2302 can include acalibration memory 2322 to store and provide calibration values 2322 athat can be used with the x-y processor 2309 to enhance independence ofthe x signal 2302 a and the y signal 2302 b.

In some embodiments, the calibration memory 2322 is also configured tostore and provide the calibration values 2322 aa, for example, accordingto the calibration described above in conjunction with FIG. 15.

As described above, the x-y processor 2309 is coupled to receive thethree magnetic field signals 2304 a, 2306 a, 2308 a and configured togenerate the x signal 2302 a and a y signal 2302 b, similar to the xsignal 2202 a and the y signal 2202 b of FIG. 22. To this end, furtherequations are described below, with which the x-y processor 2309 canconvert the three amplified signals 2304 a, 2306 a, 2308 s intoCartesian x and y signals 2302 a, 2302 b.

In some embodiments the x-y processor can compute the x and y signals2302 a, 2302 b using each one of the amplified signals 2304 a, 2306 a,2308 a, essentially averaging the amplified signals together. To thisend, a geometric consideration is provided below

As a geometric consideration and assuming that the second magnet 102 ofFIG. 1 experiences not only rotation but translation of the secondmagnet 102 as would be apparent from the arrangement of FIG. 1, the x-yprocessor 2309 can use the output signals of each magnetic field sensingelements 2318 a, 2318 b, 2318 c to compute an x coordinate position ofthe shaft , and a y position of the shaft, e.g., 102 of FIG. 1. The x-yprocessor 2309 can essentially average output signals from the threemagnetic field sensing elements 2318 a, 2318 b, 2318 c to increaseaccuracy of the computation.

For example, if the magnetic field sensing elements 2318 a, 2318 b, 2318c are placed relative one hundred twenty degree apart as shown, thenequation (6) can be used to compute an x position of the second magnet,e.g., 104.:

$\begin{matrix}{X = {F - \left( \frac{G + H}{2} \right)}} & (6)\end{matrix}$

where:

X is an x position (Which is related to the x value 2302 a) of thesecond magnet, e.g., 104, in an x direction;

F is a distance between. the magnetic field sensing element 2318 a and acenter of the second magnet, e.g., 104;

G is a distance between the magnetic field sensing element 2318 b andthe center of the second magnet, e.g., 104; and

H is a distance between magnetic field sensing element 2318 c and thecenter of the second magnet, e.g., 104.

It should be understood that the distances F, G, and H are related tovalues of the magnetic field signals 2316 a, 2316 b, 2316 c,respectively. Rotation amounts of the second magnet 104 can be used inplace of the above distances.

In another embodiment, equation (7) can be used to compute the Xposition of the second magnet, e.g., 104:

$\begin{matrix}{{X = \frac{\begin{matrix}{\left( {X_{2312\mspace{11mu} a} + D_{2312\mspace{14mu} a}} \right) + \left( {X_{2312\mspace{14mu} b} - {D_{2312\mspace{14mu} b}{{COS}(60)}}} \right) +} \\\left( {X_{2312\mspace{14mu} c} - {D_{2312\mspace{14mu} c}{{COS}(60)}}} \right)\end{matrix}}{3}},} & (7)\end{matrix}$

where:

X is an x position (which is related to the x value 2302 a) of thesecond magnet, e.g., 104, in an x direction;

X_(2318a) is an x projected position in an x-y plane of the magneticfield sensing element 2318 a,

D_(2318a) is a distance between the magnetic field sensing element 2318a and the center of the second magnet, e.g., 104.

X_(2318b) is an x projected position in the x-y plane of the magneticfield sensing element 2318 b);

D_(2318b) is the distance between the magnetic field sensing element2318 b and the center of the second magnet, e.g., 104.

X_(1312c) is an x projected. position. in the x-y plane of the magneticfield sensing element 2318 c.

D_(2318c) is the distance between the magnetic field sensing element2318 c and the center of the second magnet, e.g., 104.

It should be understood that the distances above are related to valuesof the magnetic field signals 2316 a, 2316 b, 2316 c. Rotation amountsof the second magnet 104 can be used in place of the above distances.

Using the same example, equation (8) can be used to compute a Y positionof second magnet, e.g., 104:

$\begin{matrix}{Y = {{{\sin (90)}/{\sin (120)}}*\left( {\frac{3*G}{2} - \frac{3*H}{2}} \right)}} & (8)\end{matrix}$

where:

Y is a y position (which is related to the y value 2302 b) of the secondmagnet, e.g., 104, in a y direction;

G is the distance between the magnetic field sensing element 2318 b andthe center of the second magnet, e.g., 104; and

H is the distance between magnetic field sensing element 2318 c and thecenter of the second magnet, e.g., 104

It should be understood that the distances G and H are related to valuesof the magnetic field signals 2316 b, 2316 c, respectively. Rotationamounts of the second magnet 104 can be used in place of the abovedistances.

In another embodiment, equation (9) can be used to compute the Yposition of magnetic target 102:

$\begin{matrix}{{Y = \frac{\begin{matrix}{\left( {Y_{2312\mspace{11mu} b} + {D_{2312\mspace{14mu} b}{{COS}(30)}}} \right) +} \\\left( {Y_{2312\mspace{14mu} c} - {D_{2312\mspace{14mu} c}{{COS}(30)}}} \right)\end{matrix}}{2}},} & (9)\end{matrix}$

where:

Y is a y position (which is related to the y value 2302 b) of the secondmagnet, e.g., 104, in a y direction;

Y_(2318b) is a y projected position in the x-y plane of the magneticfield sensing element 2318 b;

D_(2318b) is a distance between the magnetic field sensing element 2318b and the center of the second magnet, e.g., 104;

Y_(2318c) is a y projected position in the x-y plane of magnetic fieldsensing element 2318 c; and

D_(2318c) is a distance between magnetic field sensing element 2318 cand the center of the second magnet, e.g., 104.

It should be understood that the distances above are related to valuesof the magnetic field signals 2316 a, 2316 b, 2316 c. Rotation amountsof the second magnet 104 can he used in place of the above distances.

In equation (9), the distance between magnetic field sensing element2318 a and the center of the second magnet, e.g., 104, is not usedbecause the magnetic field sensing element 2318 a is positioned to sensedistance directly along the x axis. Therefore, the distance measured. bymagnetic field sensing element 2318 a (and associated y value of thiselement) does not include a y projected position.

These above equations are provided as examples only. The equations abovemay be used, for example, if the magnetic field sensing elements arearranged in 120 degree increments (as shown in FIG. 23). Other equationsmay be used if the sensing elements are placed in other positions. Forexample, the magnetic field sensing elements may be placed at+/−forty-five degrees from a center element, at sixty degrees from acenter element, at +/−ninety degrees from a center element, or an anyother placement. Also, the magnetic field sensing elements 2318 a, 2318b, 2318 c need not be placed in regular spacing. For example, there canbe any angle A between the magnetic field sensing element 2318 a and themagnetic field sensing element 2318 b and there can be any angle Bbetween the magnetic field sensing 2318 a and the magnetic field sensingelements 2318 c. The angles A and B need not be the same angle.

Depending on the arrangement of the magnetic field sensing elements, theangles between them, different formulas may be used to compute the aboveX and Y positions.

It will also be apparent that, if the second magnet 102 of FIG. I isarranged to rotate without translation, other equations can be used todetermine the X and Y positions. In some embodiments, the equations usedto compute the X and Y positions may be adjusted to alter sensitivity,accuracy, timing, or other parameters related to the position of secondmagnet 104.

As described above, where the second magnet 104 of FIG. 1 experiencestranslation of the second magnet 104, sensing the x and y position ofsecond magnet 104 provides the x signal 2302 a and the y signal 2302 b,resulting in computation of the z tilt angle signal 2302 e, the xdirection angle signal 2302 c, and the y direction angle signal 2302 dusing equations described above.

All references cited herein are hereby incorporated herein by referencein their entirety. Having described preferred embodiments, which serveto illustrate various concepts, structures and techniques, which are thesubject of this patent, it will now become apparent that otherembodiments incorporating these concepts, structures and techniques maybe used. Accordingly, it is submitted that the scope of the patentshould not be limited to the described embodiments but rather should belimited only by the spirit and scope of the following claims.

What is claimed is:
 1. A magnetic field sensor, comprising: an electronic circuit, comprising: a substrate having a major surface disposed in an x-y plane; first, second, third, and fourth magnetic field sensing elements disposed upon the major surface of the substrate and configured to generate first, second, third and fourth respective electronic magnetic field signals, wherein each, electronic magnetic field signal is responsive to a respective magnetic field parallel to the major surface of the substrate, wherein the first and third magnetic field sensing elements have respective first and third maximum response axes parallel to each other, directed in opposite directions, and parallel to the major surface of the substrate, and wherein the second and fourth magnetic field sensing elements have respective second and fourth maximum response axes parallel to each other, directed in opposite directions, and parallel the major surface of the substrate, wherein the first and third major response axes are not parallel to the second and fourth major response axes; a first differential circuit coupled to the first and third magnetic field sensing elements and configured to generate a first difference signal related to a difference between the first and third electronic magnetic field signals; and a second differential circuit coupled to the second and fourth magnetic field sensing elements and configured to generate a second difference signal related to a difference between the second and fourth electronic magnetic field signals, wherein the first difference signal has an amplitude related to a an x-axis projection upon the x-y plane and the second difference signal has an amplitude related to a y-axis projection upon the x-y plane.
 2. The electronic circuit of claim 1, further comprising a direction angle processor coupled to receive signals representative of the first and second difference signals and configured to generate at least one of an x direction angle signal or a y direction angle signal, wherein the x direction angle signal is representative of an angle relative to an x-axis in an x-y plane, and wherein the y direction angle signal is representative of an angle relative to a y-axis in the x-y plane.
 3. The electronic circuit of claim 2, further comprising a tilt angle processor coupled to receive signals representative of the first and second difference signals and configured to generate a z tilt angle signal representative of an angle relative to a x-y-z Cartesian coordinates having the x-y plane.
 4. The electronic circuit of claim 1, further comprising a tilt angle processor coupled to receive signals representative of the first and second difference signals and configured to generate a z tilt angle signal representative of an angle relative to a z-axis in x-y-z Cartesian coordinate.
 5. The magnetic field sensor of claim 1, wherein a first line between centers of the first and third magnetic field sensing elements is perpendicular to a second line between centers of the second and fourth magnetic field sensing elements, wherein the first and third major response axes are perpendicular to the second and fourth major response axes.
 6. The magnetic field sensor of claim 1, further comprising a magnet disposed proximate to the first, second, third, and fourth magnetic field sensing elements, wherein the magnet has a north pole and a south pole, a line between which is perpendicular to the major surface of the substrate, wherein a magnetic force of the magnet results in a restoring force upon a shaft.
 7. The magnetic field sensor of claim 6, wherein the magnet is disk shaped.
 8. The magnetic field sensor of claim 6, wherein. the magnet is disk shaped and has a central void disposed proximate to the electronic circuit.
 9. The magnetic field sensor of claim 1, wherein the first, second, third, and fourth magnetic field sensing elements are magnetoresistance elements.
 10. The magnetic field sensor of claim 1, wherein the first, second, third, and fourth magnetic field sensing elements are vertical Hall elements.
 11. A magnetic assembly, comprising: a first magnet having north and south magnetic poles; a second magnet having north and south magnetic poles; a movable shaft fixedly coupled to the second magnet such that movement of the movable shaft results in movement of the second magnet relative to the first magnet such that a line between centers of the north and south magnetic poles of the second magnet is movable relative to a line between the north and south magnetic poles of the first magnet, wherein an attraction of the second magnet to the first magnet result in a restoring force upon the shaft; and a magnetic field sensor disposed between the first and second magnets, wherein the magnetic field sensor comprises an electronic circuit, comprising: a substrate having a major surface disposed in an x-y plane, wherein the line between centers of the north and south magnetic poles of the first magnet is perpendicular to the x-y plane; first, second, third, and fourth magnetic field sensing elements disposed upon the major surface of the substrate and configured to generate first , second, third and fourth respective electronic magnetic field signals, wherein each electronic magnetic field signal is responsive to a respective magnetic field parallel to the major surface of the substrate, wherein the first and third magnetic field sensing elements have respective first and third maximum response axes parallel to each other, directed in opposite directions, and parallel the major surface of the substrate, and wherein the second and fourth magnetic field sensing elements have respective second and fourth maximum response axes parallel to each other, directed in opposite directions, and parallel the major surface of the substrate, wherein the first and third major response axes are not parallel to the second and fourth major response axes; a first differential circuit coupled to the first and third magnetic field sensing elements and configured to generate a first difference signal related to a difference between the. first and third electronic magnetic field signals; and a second differential circuit coupled to the second and fourth magnetic field sensing elements and configured to generate a second difference signal related to a difference between the second and fourth electronic magnetic field signals, wherein the first difference signal has an amplitude related to a an x-axis projection upon the x-y plane and the second difference signal has an amplitude related to a y-axis projection upon the x-y plane.
 12. The magnetic assembly of claim 11, wherein the electronic circuit further comprises a direction angle processor coupled to receive signals representative of the first and second difference signals and configured to generate at least one of an x direction angle signal or a y direction angle signal, wherein the x direction angle signal is representative of an angle relative to an x-axis in an x-y plane, and Wherein the y direction angle signal is representative of an angle relative to a y-axis in the x-y plane.
 13. The magnetic assembly of claim 12, wherein the electronic circuit further comprises a tilt angle processor coupled to receive signals representative of the first and second difference signals and configured to generate a z tilt angle signal representative of an angle relative to a z-axis in x-y-z Cartesian coordinates having the x-y plane.
 14. The magnetic assembly of claim 11, wherein the electronic circuit further comprises a tilt angle processor coupled to receive signals representative of the first and second difference signals and configured to generate a z tilt angle signal representative of an angle relative to a z axis in x-y-z Cartesian coordinate.
 15. The magnetic assembly of claim 11, wherein either the north pole of the second magnet is proximate to the south pole of the first magnet or the south pole of the second magnet is proximate to the north pole of the first magnet.
 16. The magnetic assembly of claim 11, further comprising a cavity into which the second magnet is movably disposed.
 17. The magnetic assembly of claim 11, further comprising a cavity into which the second magnet is movably disposed, wherein a shape of the cavity and a shape of the second magnet are selected to restrict movement of the second magnet is a direction parallel to the major surface of the substrate.
 18. The magnetic assembly of claim 11, Wherein the second magnet is spherical.
 19. The magnetic assembly of claim 11, wherein the second magnet is disk shaped.
 20. The magnetic assembly of claim 11, wherein the second magnet is disk shaped and has a central void disposed proximate to the electronic circuit.
 21. The magnetic assembly of claim 11, wherein the first magnet is disk shaped.
 22. The magnetic assembly of claim 11, wherein the first magnet is disk shaped and has a central void disposed proximate to the electronic circuit.
 23. The magnetic assembly of claim 11, wherein a first line between centers of the first and third magnetic field sensing elements is perpendicular to a second line between centers of the second and fourth magnetic field sensing elements, wherein the first and third major response axes are perpendicular to the second and fourth major response axes.
 24. The magnetic assembly of claim 11, wherein the first, second, third, and fourth magnetic field sensing elements are magnetoresistance elements.
 25. The magnetic assembly of claim 11, wherein the first, second, third, and fourth magnetic field sensing elements are vertical Hall elements.
 26. A method of sensing a position of a magnet, comprising: providing, upon a substrate, first, second, third, and fourth magnetic field sensing elements configured to generate first, second, third and fourth respective electronic magnetic field signals, wherein each electronic magnetic field signal is responsive to a respective magnetic field parallel to the major surface of the substrate, wherein the first and third magnetic field sensing elements have respective first and third maximum response axes parallel to each other, directed in opposite directions, and parallel to the major surface of the substrate, and wherein the second and fourth magnetic field sensing elements have respective second and fourth maximum response axes parallel to each other, directed in opposite directions, and parallel the major surface of the substrate, wherein the first and third major response axes are not parallel to the second and fourth major response axes; generating a first difference signal related to a difference between the first and third electronic magnetic field signals; and generating a second difference signal related to a difference between the second and fourth electronic magnetic field signals.
 27. The method claim 26, further comprising generating at least one of an x direction angle signal or a y direction angle signal, wherein the x direction angle signal is representative of an angle relative to an x-axis in an x-y plane, and wherein the y direction. angle signal is representative of an angle relative to a y-axis in the x-y plane.
 28. The method of claim 27, further comprising: generating a z tilt angle signal representative of an angle relative to a z-axis in x-y-z Cartesian coordinates having the x-y plane.
 29. The method of claim 26, further comprising: generating a z tilt angle signal representative of an angle relative to a z-axis in x-y-z Cartesian coordinates.
 30. A method of sensing a position of a magnet, comprising: providing a first magnet having north and south magnetic poles; providing a second magnet having north and south magnetic poles; providing a movable shaft fixedly coupled to the second magnet such that movement of the movable shaft results in movement of the second magnet relative to the first magnet such that a line between centers of the north and south magnetic poles of the second magnet is movable relative to a line between the north and south magnetic poles of the first magnet, wherein an attraction of the second magnet to the first magnet result in a restoring force upon the shaft; and providing a magnetic field sensor disposed between the first and second magnets, wherein the magnetic field sensor comprises an electronic circuit, comprising: a substrate having a major surface disposed in an x-y plane, wherein the line between centers of the north and south magnetic poles of the first magnet is perpendicular to the x-y plane; first, second, third, and fourth magnetic field sensing elements disposed upon the major surface of the substrate and configured to generate first, second, third and fourth respective electronic magnetic field signals, wherein each electronic magnetic field signal is responsive to a respective magnetic field parallel to the major surface of the substrate, wherein the first and third magnetic field sensing elements have respective first and third maximum response axes parallel to each other, directed in opposite directions, and parallel the major surface of the substrate, and wherein the second and fourth magnetic field sensing elements have respective second and fourth maximum response axes parallel to each other, directed in opposite directions, and parallel the major surface of the substrate, wherein the first and third major response axes are not parallel to the second and fourth major response axes; generating a first difference signal related to a difference between the first and third electronic magnetic field signals; and generating a second difference signal related to a difference between the second and fourth electronic magnetic field signals, wherein the first difference signal has an amplitude related to a an x-axis projection upon the x-y plane and the second difference signal has an amplitude related to a y-axis projection upon the x-y plane.
 31. The method claim 30, further comprising generating at least one of an x direction angle signal or a y direction angle signal, wherein the x direction angle signal is representative of an angle relative to an x-axis in an x-y plane, and wherein the y direction angle signal is representative of an angle relative to a y-axis in the x-y plane.
 32. The method of claim 31, further comprising: generating a z tilt angle signal representative of an angle relative to a z-axis in x-y-z Cartesian coordinates having the x y plane.
 33. The method of claim 30, further comprising: generating a z tilt angle signal representative of an angle relative to a z-axis in x-y-z Cartesian coordinates.
 34. A magnetic field sensor, comprising: an electronic circuit, comprising: a substrate having a major surface disposed in an x-y plane; a plurality of magnetic field sensing elements disposed upon the major surface of the substrate and configured to generate a respective plurality of electronic magnetic field signals, wherein each electronic magnetic field signal is responsive to a respective magnetic field parallel to the major surface of the substrate, wherein the plurality of magnetic field sensing elements have respective maximum response axes directed in different directions and parallel to the major surface of the substrate; a processor coupled to the plurality of magnetic field sensing elements and configured to generate a first signal and a second signal, wherein the first signal has an amplitude related to a an x-axis projection upon the x-y plane and the second signal has an amplitude related to a y-axis projection upon the x-y plane; and a magnet disposed at a fixed relationship and proximate to the substrate, wherein the magnet has a north pole and a south pole, a line between which is perpendicular to the major surface of the substrate, wherein a magnetic force of the magnet results in a restoring force upon a shaft.
 35. The magnetic. field sensor of claim 34, wherein the plurality of magnetic field sensing elements comprises three magnetic field sensing elements.
 36. The magnetic field sensor of claim 35, wherein the three magnetic field sensing elements are arranged in a triangular arrangement in the x-y plane.
 37. A magnetic assembly, comprising: a first magnet having north and south magnetic poles; a second magnet having north and south magnetic poles; a movable shaft fixedly coupled to the second magnet such that movement of the movable shaft results in movement of the second magnet relative to the first magnet such that a line between centers of the north and south magnetic poles of the second magnet is movable relative to a line between the north and south magnetic poles of the first magnet, wherein an attraction of the second magnet to the first magnet result in a restoring force upon the shaft; and a magnetic field sensor disposed between the first and second magnets, wherein the magnetic field sensor comprises an electronic circuit, comprising: a substrate having a major surface disposed in an x-y plane, wherein the line between centers of the north and south magnetic poles of the first magnet is perpendicular to the x-y plane; a plurality of magnetic field sensing elements disposed upon the major surface of the substrate and configured to generate a respective plurality of electronic magnetic field signals, wherein each electronic magnetic field signal is responsive to a respective magnetic field parallel to the major surface of the substrate, wherein the plurality of magnetic field sensing elements have respective maximum response axes directed in different directions and parallel to the major surface of the substrate; and a processor coupled to the plurality of magnetic field sensing elements and configured to generate a first signal and a second signal, wherein the first signal has an amplitude related to a an x-axis projection upon the x-y plane and the second signal has an amplitude related to a y-axis projection upon the x-y plane.
 38. The magnetic field sensor of claim 37, wherein the plurality of magnetic field sensing elements comprises three magnetic field sensing elements.
 39. The magnetic field sensor of claim 38, wherein the three magnetic field sensing elements are arranged in a triangular arrangement in the x-y plane.
 40. A method of sensing a position of a magnet, comprising: providing, upon a substrate, a plurality of magnetic field sensing elements disposed upon the major surface of the substrate and configured to generate a respective plurality of electronic magnetic field signals, wherein each electronic magnetic field signal is responsive to a respective magnetic field parallel to the major surface of the substrate, wherein the plurality of magnetic field sensing elements have respective maximum response axes directed in different directions and parallel to the major surface of the substrate; generating a first signal and a second signal, wherein the first signal has an amplitude related to a an x-axis projection upon the x-y plane and the second signal has an amplitude related to a y-axis projection upon the x-y plane; and providing a magnet disposed at a fixed relationship and proximate to the substrate, wherein the magnet has a north pole and a south pole, a line between which is perpendicular to the major surface of the substrate, wherein a magnetic force of the magnet results in a restoring force upon a shaft.
 41. The method of claim 40, wherein the plurality of magnetic field sensing elements comprises three magnetic field sensing elements.
 42. The method of claim 41, wherein the three magnetic field sensing elements are arranged in a triangular arrangement in the x-y plane.
 43. A method of sensing a position of a magnet, comprising: providing a first magnet having north and south magnetic poles; providing a second magnet having north and south magnetic poles; providing a movable shaft fixedly coupled to the second magnet such that movement of the movable shaft results in movement of the second magnet relative to the first magnet such that a line between centers of the north and south magnetic poles of the second magnet is movable relative to a line between the north and south magnetic poles of the first magnet, wherein an attraction of the second magnet to the first magnet result in a restoring force upon the shaft; and providing a magnetic field sensor disposed between the first and second magnets, wherein the magnetic field sensor comprises an electronic circuit, comprising: a substrate having a major surface disposed in an x-y plane, wherein the line between centers of the north and south magnetic poles of the first magnet is perpendicular to the x-y plane; and a plurality of magnetic field sensing elements disposed upon the major surface of the substrate and configured to generate a respective plurality of electronic magnetic field signals, wherein each electronic magnetic field signal is responsive to a respective magnetic field parallel to the major surface of the substrate, wherein the plurality of magnetic field sensing elements have respective maximum response axes directed in different directions and parallel to the major surface of the substrate, wherein the method further comprises: generating a first signal and a second signal, wherein the first signal has an amplitude related to an x-axis projection upon the x-y plane and the second signal has an amplitude related to a y-axis projection upon the x-y plane.
 44. The method of claim 43, wherein the plurality of magnetic field sensing elements comprises three magnetic field sensing elements.
 45. The method of claim 44, wherein the three magnetic field sensing elements are arranged in a triangular arrangement in the x-y plane. 